package kr.hkit.myframework.uicomp;

import javax.swing.JPanel;
import javax.swing.JLabel;
import java.awt.GridLayout;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import java.awt.FlowLayout;

public class InputPanel extends JPanel {
	private JLabel lbl;
	private JTextField tf;

	/**
	 * Create the panel.
	 */
	public InputPanel() {

		initialize();
	}
	public InputPanel(String lblStr) {
		initialize();
		this.lbl.setText(lblStr);
	}
	
	
	private void initialize() {
		setLayout(new GridLayout(0, 2, 0, 0));
		
		lbl = new JLabel("New label");
		lbl.setHorizontalAlignment(SwingConstants.CENTER);
		add(lbl);
		
		tf = new JTextField();
		tf.setHorizontalAlignment(SwingConstants.CENTER);
		add(tf);
		tf.setColumns(10);
	}
	
	public void setLbl(String lbl) {
		this.lbl.setText(lbl);
	}
	public JTextField getTf() {
		return tf;
	}
	public void setTf(String tf) {
		this.tf.setText(tf);
	}

	
	
}
